package com.angel.sensors.model;

/**
 * Heredamos la clase SensorComponent
 *
 */
public class StringComponent extends SensorComponent {
    private String value;
    
    public StringComponent(String name, String text) {
        super(name, text);
    }

    @Override
    public String getValue() {
        return value;
    }
    
    @Override
    public String getUnit() { return null; }
    
    public void update(String value) {
        this.value = value;
    }
    
    public boolean isDefined() {
        return value != null;
    }
    
    public void clear() {
        value = null;
    }
}
